package com.shanjupay.merchant.feign;

import com.shanjupay.common.domain.BusinessException;
import com.shanjupay.service.api.dto.AppDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * TODO
 *
 * @Description
 * @Author zhangbing
 * @Date 2024/5/20 9:30
 **/
@FeignClient("merchant-service2104")
public interface AppFeign {

    @PostMapping("/createApp")
    AppDTO createApp(@RequestBody AppDTO appDTO) throws BusinessException;

    //根据merchantID查询
    @GetMapping("/queryApps")
    List<AppDTO> queryAppByMerchantId(@RequestParam Long merchanId)throws BusinessException;
    //根据应用ID查询详细信息
    @GetMapping("/app/{appId}")
    AppDTO getAppById(@PathVariable String id);
}
